package com.gitee.shop.service.impl;

import com.gitee.shop.domain.User;
import com.gitee.shop.mapper.UserMapper;
import com.gitee.shop.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class UserServiceImpl implements UserService {

    //注入dao
    @Autowired
    private UserMapper userMapper;

    @Override
    public int insert(User record) {
        return 0;
    }

    @Override
    public List<User> selectAll() {
        return null;
    }

    @Override
    public void deleteByPrimaryKey(Integer uid) {

    }

    @Override
    public void updateByPrimaryKey(User user) {

    }

    @Override
    public User selectByPrimaryKey(Integer uid) {
        return null;
    }

    @Override
    public User loginUser(String username, String password) {
        return userMapper.loginUser(username,password);
    }
}
